3.203 \(\int (a+b \sin (e+f x))^3 (g \tan (e+f x))^p \, dx\)

Optimal. Leaf size=271 \[ \frac{3 a^2 b \sin (e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+2}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)}+\frac{a^3 (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac{p+1}{2};\frac{p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac{3 a b^2 (g \tan (e+f x))^{p+3} \, _2F_1\left (2,\frac{p+3}{2};\frac{p+5}{2};-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac{b^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+4}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{f g (p+4)} \]

[Out]

(a^3*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) + (3*
a^2*b*(Cos[e + f*x]^2)^((1 + p)/2)*Hypergeometric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e +
f*x]*(g*Tan[e + f*x])^(1 + p))/(f*g*(2 + p)) + (b^3*(Cos[e + f*x]^2)^((1 + p)/2)*Hypergeometric2F1[(1 + p)/2,
(4 + p)/2, (6 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x]^3*(g*Tan[e + f*x])^(1 + p))/(f*g*(4 + p)) + (3*a*b^2*Hyperg
eometric2F1[2, (3 + p)/2, (5 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(3 + p))/(f*g^3*(3 + p))

________________________________________________________________________________________

Rubi [A]  time = 0.379927, antiderivative size = 271, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 6, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.261, Rules used = {2722, 3476, 364, 2602, 2577, 2591} \[ \frac{3 a^2 b \sin (e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+2}{2};\frac{p+4}{2};\sin ^2(e+f x)\right )}{f g (p+2)}+\frac{a^3 (g \tan (e+f x))^{p+1} \, _2F_1\left (1,\frac{p+1}{2};\frac{p+3}{2};-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac{3 a b^2 (g \tan (e+f x))^{p+3} \, _2F_1\left (2,\frac{p+3}{2};\frac{p+5}{2};-\tan ^2(e+f x)\right )}{f g^3 (p+3)}+\frac{b^3 \sin ^3(e+f x) \cos ^2(e+f x)^{\frac{p+1}{2}} (g \tan (e+f x))^{p+1} \, _2F_1\left (\frac{p+1}{2},\frac{p+4}{2};\frac{p+6}{2};\sin ^2(e+f x)\right )}{f g (p+4)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[e + f*x])^3*(g*Tan[e + f*x])^p,x]

[Out]

(a^3*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) + (3*
a^2*b*(Cos[e + f*x]^2)^((1 + p)/2)*Hypergeometric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e +
f*x]*(g*Tan[e + f*x])^(1 + p))/(f*g*(2 + p)) + (b^3*(Cos[e + f*x]^2)^((1 + p)/2)*Hypergeometric2F1[(1 + p)/2,
(4 + p)/2, (6 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x]^3*(g*Tan[e + f*x])^(1 + p))/(f*g*(4 + p)) + (3*a*b^2*Hyperg
eometric2F1[2, (3 + p)/2, (5 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(3 + p))/(f*g^3*(3 + p))

Rule 2722

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Int[Expan
dIntegrand[(g*Tan[e + f*x])^p, (a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2
, 0] && IGtQ[m, 0]

Rule 3476

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[b/d, Subst[Int[x^n/(b^2 + x^2), x], x, b*Tan[c + d
*x]], x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 364

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(a^p*(c*x)^(m + 1)*Hypergeometric2F1[-
p, (m + 1)/n, (m + 1)/n + 1, -((b*x^n)/a)])/(c*(m + 1)), x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 2602

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[(a*Cos[e + f
*x]^(n + 1)*(b*Tan[e + f*x])^(n + 1))/(b*(a*Sin[e + f*x])^(n + 1)), Int[(a*Sin[e + f*x])^(m + n)/Cos[e + f*x]^
n, x], x] /; FreeQ[{a, b, e, f, m, n}, x] &&  !IntegerQ[n]

Rule 2577

Int[(cos[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[(b^(2*IntPart
[(n - 1)/2] + 1)*(b*Cos[e + f*x])^(2*FracPart[(n - 1)/2])*(a*Sin[e + f*x])^(m + 1)*Hypergeometric2F1[(1 + m)/2
, (1 - n)/2, (3 + m)/2, Sin[e + f*x]^2])/(a*f*(m + 1)*(Cos[e + f*x]^2)^FracPart[(n - 1)/2]), x] /; FreeQ[{a, b
, e, f, m, n}, x]

Rule 2591

Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> With[{ff = FreeFactors[Ta
n[e + f*x], x]}, Dist[(b*ff)/f, Subst[Int[(ff*x)^(m + n)/(b^2 + ff^2*x^2)^(m/2 + 1), x], x, (b*Tan[e + f*x])/f
f], x]] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2]

Rubi steps

\begin{align*} \int (a+b \sin (e+f x))^3 (g \tan (e+f x))^p \, dx &=\int \left (a^3 (g \tan (e+f x))^p+3 a^2 b \sin (e+f x) (g \tan (e+f x))^p+3 a b^2 \sin ^2(e+f x) (g \tan (e+f x))^p+b^3 \sin ^3(e+f x) (g \tan (e+f x))^p\right ) \, dx\\ &=a^3 \int (g \tan (e+f x))^p \, dx+\left (3 a^2 b\right ) \int \sin (e+f x) (g \tan (e+f x))^p \, dx+\left (3 a b^2\right ) \int \sin ^2(e+f x) (g \tan (e+f x))^p \, dx+b^3 \int \sin ^3(e+f x) (g \tan (e+f x))^p \, dx\\ &=\frac{\left (a^3 g\right ) \operatorname{Subst}\left (\int \frac{x^p}{g^2+x^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac{\left (3 a b^2 g\right ) \operatorname{Subst}\left (\int \frac{x^{2+p}}{\left (g^2+x^2\right )^2} \, dx,x,g \tan (e+f x)\right )}{f}+\frac{\left (3 a^2 b \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{1+p}(e+f x) \, dx}{g}+\frac{\left (b^3 \cos ^{1+p}(e+f x) \sin ^{-1-p}(e+f x) (g \tan (e+f x))^{1+p}\right ) \int \cos ^{-p}(e+f x) \sin ^{3+p}(e+f x) \, dx}{g}\\ &=\frac{a^3 \, _2F_1\left (1,\frac{1+p}{2};\frac{3+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac{3 a^2 b \cos ^2(e+f x)^{\frac{1+p}{2}} \, _2F_1\left (\frac{1+p}{2},\frac{2+p}{2};\frac{4+p}{2};\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}+\frac{b^3 \cos ^2(e+f x)^{\frac{1+p}{2}} \, _2F_1\left (\frac{1+p}{2},\frac{4+p}{2};\frac{6+p}{2};\sin ^2(e+f x)\right ) \sin ^3(e+f x) (g \tan (e+f x))^{1+p}}{f g (4+p)}+\frac{3 a b^2 \, _2F_1\left (2,\frac{3+p}{2};\frac{5+p}{2};-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{3+p}}{f g^3 (3+p)}\\ \end{align*}

Mathematica [C]  time = 18.4028, size = 4791, normalized size = 17.68 \[ \text{Result too large to show} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*Sin[e + f*x])^3*(g*Tan[e + f*x])^p,x]

[Out]

(2*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^p*Tan[(e + f*x)/2]*(a^3*(2 + p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[
(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*b*(6*a*b*(2 + p)*AppellF1[(1 + p)/2, p, 2, (3 + p)/2, Tan[(e + f*x)/2
]^2, -Tan[(e + f*x)/2]^2] - 6*a*b*(2 + p)*AppellF1[(1 + p)/2, p, 3, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f
*x)/2]^2] + (1 + p)*(3*a^2*AppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 4*b^2*(
AppellF1[1 + p/2, p, 3, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - AppellF1[1 + p/2, p, 4, 2 + p/2, T
an[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]))*Tan[(e + f*x)/2]))*(g*Tan[e + f*x])^p*(-(b^3*Sin[3*(e + f*x)]*Tan[e
+ f*x]^p)/8 - a^3*Sin[e + f*x]^3*Sin[3*(e + f*x)]*Tan[e + f*x]^p + ((3*I)/8)*b^3*Sin[2*(e + f*x)]*Sin[3*(e + f
*x)]*Tan[e + f*x]^p + (3*b^3*Sin[2*(e + f*x)]^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/8 - (I/8)*b^3*Sin[2*(e + f*x)
]^3*Sin[3*(e + f*x)]*Tan[e + f*x]^p + Cos[e + f*x]^3*(a^3*Cos[3*(e + f*x)]*Tan[e + f*x]^p - I*a^3*Sin[3*(e + f
*x)]*Tan[e + f*x]^p) + Cos[2*(e + f*x)]^3*((I/8)*b^3*Cos[3*(e + f*x)]*Tan[e + f*x]^p + (b^3*Sin[3*(e + f*x)]*T
an[e + f*x]^p)/8) + Sin[e + f*x]^2*((-3*a^2*b*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/2 + ((3*I)/2)*a^2*b*Sin[2*(e +
f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p) + Sin[e + f*x]*((-3*a*b^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/4 + ((3*I)/2
)*a*b^2*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p + (3*a*b^2*Sin[2*(e + f*x)]^2*Sin[3*(e + f*x)]*Tan[e
+ f*x]^p)/4) + Cos[2*(e + f*x)]^2*((-3*b^3*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/8 - (3*a*b^2*Sin[e + f*x]*Sin[3*(e
 + f*x)]*Tan[e + f*x]^p)/4 + ((3*I)/8)*b^3*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p + Cos[3*(e + f*x)]
*(((-3*I)/8)*b^3*Tan[e + f*x]^p - ((3*I)/4)*a*b^2*Sin[e + f*x]*Tan[e + f*x]^p - (3*b^3*Sin[2*(e + f*x)]*Tan[e
+ f*x]^p)/8)) + Cos[3*(e + f*x)]*((-I/8)*b^3*Tan[e + f*x]^p - I*a^3*Sin[e + f*x]^3*Tan[e + f*x]^p - (3*b^3*Sin
[2*(e + f*x)]*Tan[e + f*x]^p)/8 + ((3*I)/8)*b^3*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p + (b^3*Sin[2*(e + f*x)]^3*Ta
n[e + f*x]^p)/8 + Sin[e + f*x]^2*(((-3*I)/2)*a^2*b*Tan[e + f*x]^p - (3*a^2*b*Sin[2*(e + f*x)]*Tan[e + f*x]^p)/
2) + Sin[e + f*x]*(((-3*I)/4)*a*b^2*Tan[e + f*x]^p - (3*a*b^2*Sin[2*(e + f*x)]*Tan[e + f*x]^p)/2 + ((3*I)/4)*a
*b^2*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p)) + Cos[e + f*x]^2*((3*a^2*b*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/2 + 3*a^3
*Sin[e + f*x]*Sin[3*(e + f*x)]*Tan[e + f*x]^p - ((3*I)/2)*a^2*b*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]
^p + Cos[3*(e + f*x)]*(((3*I)/2)*a^2*b*Tan[e + f*x]^p + (3*I)*a^3*Sin[e + f*x]*Tan[e + f*x]^p + (3*a^2*b*Sin[2
*(e + f*x)]*Tan[e + f*x]^p)/2) + Cos[2*(e + f*x)]*(((-3*I)/2)*a^2*b*Cos[3*(e + f*x)]*Tan[e + f*x]^p - (3*a^2*b
*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/2)) + Cos[e + f*x]*(((3*I)/4)*a*b^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p + (3*I)*
a^3*Sin[e + f*x]^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p + (3*a*b^2*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p
)/2 - ((3*I)/4)*a*b^2*Sin[2*(e + f*x)]^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p + Cos[2*(e + f*x)]^2*((-3*a*b^2*Cos[3
*(e + f*x)]*Tan[e + f*x]^p)/4 + ((3*I)/4)*a*b^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p) + Sin[e + f*x]*((3*I)*a^2*b*S
in[3*(e + f*x)]*Tan[e + f*x]^p + 3*a^2*b*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p) + Cos[3*(e + f*x)]*
((-3*a*b^2*Tan[e + f*x]^p)/4 - 3*a^3*Sin[e + f*x]^2*Tan[e + f*x]^p + ((3*I)/2)*a*b^2*Sin[2*(e + f*x)]*Tan[e +
f*x]^p + (3*a*b^2*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p)/4 + Sin[e + f*x]*(-3*a^2*b*Tan[e + f*x]^p + (3*I)*a^2*b*S
in[2*(e + f*x)]*Tan[e + f*x]^p)) + Cos[2*(e + f*x)]*(((-3*I)/2)*a*b^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p - (3*I)*
a^2*b*Sin[e + f*x]*Sin[3*(e + f*x)]*Tan[e + f*x]^p - (3*a*b^2*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p
)/2 + Cos[3*(e + f*x)]*((3*a*b^2*Tan[e + f*x]^p)/2 + 3*a^2*b*Sin[e + f*x]*Tan[e + f*x]^p - ((3*I)/2)*a*b^2*Sin
[2*(e + f*x)]*Tan[e + f*x]^p))) + Cos[2*(e + f*x)]*((3*b^3*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/8 + (3*a^2*b*Sin[e
 + f*x]^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/2 - ((3*I)/4)*b^3*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p
- (3*b^3*Sin[2*(e + f*x)]^2*Sin[3*(e + f*x)]*Tan[e + f*x]^p)/8 + Sin[e + f*x]*((3*a*b^2*Sin[3*(e + f*x)]*Tan[e
 + f*x]^p)/2 - ((3*I)/2)*a*b^2*Sin[2*(e + f*x)]*Sin[3*(e + f*x)]*Tan[e + f*x]^p) + Cos[3*(e + f*x)]*(((3*I)/8)
*b^3*Tan[e + f*x]^p + ((3*I)/2)*a^2*b*Sin[e + f*x]^2*Tan[e + f*x]^p + (3*b^3*Sin[2*(e + f*x)]*Tan[e + f*x]^p)/
4 - ((3*I)/8)*b^3*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p + Sin[e + f*x]*(((3*I)/2)*a*b^2*Tan[e + f*x]^p + (3*a*b^2*
Sin[2*(e + f*x)]*Tan[e + f*x]^p)/2)))))/(f*(1 + p)*(2 + p)*((2*p*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^p*Sec[e + f
*x]^2*Tan[(e + f*x)/2]*(a^3*(2 + p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]
^2] + 2*b*(6*a*b*(2 + p)*AppellF1[(1 + p)/2, p, 2, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - 6*a*b
*(2 + p)*AppellF1[(1 + p)/2, p, 3, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (1 + p)*(3*a^2*Appell
F1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 4*b^2*(AppellF1[1 + p/2, p, 3, 2 + p/2,
Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - AppellF1[1 + p/2, p, 4, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)
/2]^2]))*Tan[(e + f*x)/2]))*Tan[e + f*x]^(-1 + p))/((1 + p)*(2 + p)) + (Sec[(e + f*x)/2]^2*(Cos[e + f*x]*Sec[(
e + f*x)/2]^2)^p*(a^3*(2 + p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] +
2*b*(6*a*b*(2 + p)*AppellF1[(1 + p)/2, p, 2, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - 6*a*b*(2 +
p)*AppellF1[(1 + p)/2, p, 3, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (1 + p)*(3*a^2*AppellF1[1 +
 p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 4*b^2*(AppellF1[1 + p/2, p, 3, 2 + p/2, Tan[(e
 + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - AppellF1[1 + p/2, p, 4, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]
))*Tan[(e + f*x)/2]))*Tan[e + f*x]^p)/((1 + p)*(2 + p)) + (2*p*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^(-1 + p)*Tan[
(e + f*x)/2]*(-(Sec[(e + f*x)/2]^2*Sin[e + f*x]) + Cos[e + f*x]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])*(a^3*(2 +
 p)*AppellF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 2*b*(6*a*b*(2 + p)*AppellF
1[(1 + p)/2, p, 2, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] - 6*a*b*(2 + p)*AppellF1[(1 + p)/2, p,
3, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + (1 + p)*(3*a^2*AppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(
e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 4*b^2*(AppellF1[1 + p/2, p, 3, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*
x)/2]^2] - AppellF1[1 + p/2, p, 4, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]))*Tan[(e + f*x)/2]))*Tan[
e + f*x]^p)/((1 + p)*(2 + p)) + (2*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^p*Tan[(e + f*x)/2]*(a^3*(2 + p)*(-(((1 +
p)*AppellF1[1 + (1 + p)/2, p, 2, 1 + (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Ta
n[(e + f*x)/2])/(3 + p)) + (p*(1 + p)*AppellF1[1 + (1 + p)/2, 1 + p, 1, 1 + (3 + p)/2, Tan[(e + f*x)/2]^2, -Ta
n[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(3 + p)) + 2*b*(((1 + p)*(3*a^2*AppellF1[1 + p/2, p, 2,
 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 4*b^2*(AppellF1[1 + p/2, p, 3, 2 + p/2, Tan[(e + f*x)/2]^
2, -Tan[(e + f*x)/2]^2] - AppellF1[1 + p/2, p, 4, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]))*Sec[(e +
 f*x)/2]^2)/2 + 6*a*b*(2 + p)*((-2*(1 + p)*AppellF1[1 + (1 + p)/2, p, 3, 1 + (3 + p)/2, Tan[(e + f*x)/2]^2, -T
an[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(3 + p) + (p*(1 + p)*AppellF1[1 + (1 + p)/2, 1 + p, 2,
 1 + (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(3 + p)) - 6*a*b
*(2 + p)*((-3*(1 + p)*AppellF1[1 + (1 + p)/2, p, 4, 1 + (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Se
c[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(3 + p) + (p*(1 + p)*AppellF1[1 + (1 + p)/2, 1 + p, 3, 1 + (3 + p)/2, Tan[(
e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(3 + p)) + (1 + p)*Tan[(e + f*x)/2]*(
3*a^2*((-2*(1 + p/2)*AppellF1[2 + p/2, p, 3, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2
]^2*Tan[(e + f*x)/2])/(2 + p/2) + ((1 + p/2)*p*AppellF1[2 + p/2, 1 + p, 2, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(
e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(2 + p/2)) + 4*b^2*((-3*(1 + p/2)*AppellF1[2 + p/2, p, 4,
3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(2 + p/2) + (4*(1 + p/2
)*AppellF1[2 + p/2, p, 5, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2
])/(2 + p/2) + ((1 + p/2)*p*AppellF1[2 + p/2, 1 + p, 3, 3 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Sec[
(e + f*x)/2]^2*Tan[(e + f*x)/2])/(2 + p/2) - ((1 + p/2)*p*AppellF1[2 + p/2, 1 + p, 4, 3 + p/2, Tan[(e + f*x)/2
]^2, -Tan[(e + f*x)/2]^2]*Sec[(e + f*x)/2]^2*Tan[(e + f*x)/2])/(2 + p/2)))))*Tan[e + f*x]^p)/((1 + p)*(2 + p))
))

________________________________________________________________________________________

Maple [F]  time = 1.514, size = 0, normalized size = 0. \begin{align*} \int \left ( a+b\sin \left ( fx+e \right ) \right ) ^{3} \left ( g\tan \left ( fx+e \right ) \right ) ^{p}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(f*x+e))^3*(g*tan(f*x+e))^p,x)

[Out]

int((a+b*sin(f*x+e))^3*(g*tan(f*x+e))^p,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^3*(g*tan(f*x+e))^p,x, algorithm="maxima")

[Out]

integrate((b*sin(f*x + e) + a)^3*(g*tan(f*x + e))^p, x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-{\left (3 \, a b^{2} \cos \left (f x + e\right )^{2} - a^{3} - 3 \, a b^{2} +{\left (b^{3} \cos \left (f x + e\right )^{2} - 3 \, a^{2} b - b^{3}\right )} \sin \left (f x + e\right )\right )} \left (g \tan \left (f x + e\right )\right )^{p}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^3*(g*tan(f*x+e))^p,x, algorithm="fricas")

[Out]

integral(-(3*a*b^2*cos(f*x + e)^2 - a^3 - 3*a*b^2 + (b^3*cos(f*x + e)^2 - 3*a^2*b - b^3)*sin(f*x + e))*(g*tan(
f*x + e))^p, x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))**3*(g*tan(f*x+e))**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \sin \left (f x + e\right ) + a\right )}^{3} \left (g \tan \left (f x + e\right )\right )^{p}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^3*(g*tan(f*x+e))^p,x, algorithm="giac")

[Out]

integrate((b*sin(f*x + e) + a)^3*(g*tan(f*x + e))^p, x)